<template>
  <div class="topnav">
    <div class="arrow" @click="goback">
      <span class="iconfont iconjiantou2"></span>
      返回
    </div>
    <div class="title">{{titleTxt}}</div>
  </div>
</template>
<script>
export default {
  props: ["titleTxt"],
  methods: {
    goback() {
      this.$router.back();
    }
  }
  // created() {
  //   console.log("子组件created");
  // },
  // mounted() {
  //   console.log("子组件mounted");
  // }
};
</script>
<style lang="less" scoped>
.topnav {
  display: flex;
  padding: 0 6.667vw;
  height: 16.111vw;
  line-height: 16.111vw;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  width: 100%;
  box-sizing: border-box;
  background-color: #f7f7f7;
  border-bottom: 1px solid #eee;
  .title {
    flex: 1;
    text-align: center;
    padding-right: 19.167vw;
    font-weight: 700;

    // color: blue;
  }
  .arrow {
    padding: 0 10px;
    font-size: 16px;
    color: #d55a31;
  }
}
</style>